package cn.corgy.client;

import cn.corgy.Hello;
import cn.corgy.HelloService;
import cn.corgy.spring.annotation.RpcClient;
import org.springframework.stereotype.Component;

@Component
public class HelloController {

    @RpcClient(version = "version1", group = "test1")
    private HelloService helloService;

    public void test() throws InterruptedException {
        String hello = this.helloService.hello(new Hello("111", "222"));
        Thread.sleep(1200);
        for (int i = 0; i < 10; i++) {
            System.out.println(helloService.hello(new Hello("111", "222")));
        }
    }
}
